<include file="__THEME__/public_header" />

<link href="__APP__/weiba.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="__APP__/weiba.js"></script>
    

<div id="page-wrap">
	   <div id="main-wrap">
        <div class="boxShadow"> 
	   	   	 <include file="_weiba_header" />

	   	   	   <div class="clearfix content-bg">
                 <div id="col3" class="st-index-right">
                    <div class="right-wrap">
                        <div class="weiba-posts-list border-b mb20">
                         <h3>该作者发表的其他帖子</h3>
                         <ul>
                          <volist name="otherPost" id="vo">
                            <li>
                            <i class="ico-piece"></i><div class="post-name"><a href="{:U('weiba/Index/postDetail',array('post_id'=>$vo['post_id']))}" target="_blank">{$vo.title}</a><a href="{:U('weiba/Index/detail',array('weiba_id'=>$vo['weiba_id']))}" class="f9">【{$vo.weiba}】</a></div>
                            </li>         
                          </volist>  
                         </ul>
                       </div>
                       <div class="weiba-posts-list">
                         <h3>最新帖子</h3>
                         <ul>
                          <volist name="newPost" id="v1">
                            <li>
                            <i class="ico-piece"></i><div class="post-name"><a href="{:U('weiba/Index/postDetail',array('post_id'=>$v1['post_id']))}" target="_blank">{$v1.title}</a><a href="{:U('weiba/Index/detail',array('weiba_id'=>$v1['weiba_id']))}" class="f9">【{$v1.weiba}】</a></div>
                            </li>         
                          </volist>        
                         </ul>
                       </div>
                    </div>
                 </div>
                 <div id="col5" class="st-index-main">
                    <div class="extend-foot Posts-content">
                        <div class="content">
                            <p class="pb15 font-f-s"><a href="{:U('weiba/Index/index')}">微吧</a>&nbsp;>&nbsp;<a href="{:U('weiba/Index/detail',array('weiba_id'=>$post_detail['weiba_id']))}">{$weiba_name}</a>&nbsp;>&nbsp;帖子详情</p>
                            <dl class="pb10 mb20 weiba-post-title">
                                <dd>
                                  <h3><span style="vertical-align:-1px;">{$post_detail.title}</span><php>if(strstr($post_detail['content'],'<img>')){</php><i class="ico-img"></i><php>}</php><php>if($post_detail['top']==2){</php><i class="ico-bar-top ml5">置顶</i><php>}</php><php>if($post_detail['top']==1){</php><i class="ico-bar-top0 ml5">置顶</i><php>}</php><php>if($post_detail['digest']==1){</php><i class="ico-bar-fine ml5">精华</i><php>}</php></h3>
                                  <p class="lh25">
                                    <span class="right">
                                    <php>if($GLOBALS['ts']['mid']){</php>
                                      <php>if( ( $mid==$post_detail['post_uid'] && CheckPermission('weiba_normal','weiba_edit') ) || CheckWeibaPermission( $weiba_admin , '' , 'weiba_edit' ) ){</php>
                                        <a href="{:U('weiba/Index/postEdit',array('post_id'=>$post_detail['post_id']))}">编辑</a>
                                        <i class="vline">|</i>
                                        <php>}</php>
                                        <php>if( ($mid==$post_detail['post_uid'] && CheckPermission('weiba_normal','weiba_del')) || CheckWeibaPermission($weiba_admin,'','weiba_del') ){</php>
                                        <a href="#" event-node="post_del" event-args='post_id={$post_detail['post_id']}&weiba_id={$post_detail['weiba_id']}&log=0'>删除</a>
                                        <i class="vline">|</i>
                                        <php>}</php>
                                      <a event-args="sid={$post_detail['post_id']}&stable=weiba_post&curtable=feed&curid={$post_detail['feed_id']}&initHTML=&appname=weiba&cancomment=1&feedtype=weiba_post" href="javascript:void(0)" event-node="share">转发到微博</a>
                                        <i class="vline">|</i>
                                      <php>if($post_detail['favorite']==1){</php>
                                        <a event-args="post_id={$post_detail['post_id']}&weiba_id={$post_detail['weiba_id']}&post_uid={$post_detail['post_uid']}" href="javascript:void(0)" event-node="post_unfavorite" id="favorite">取消收藏</a>
                                      <php>}else{</php>
                                        <a event-args="post_id={$post_detail['post_id']}&weiba_id={$post_detail['weiba_id']}&post_uid={$post_detail['post_uid']}" href="javascript:void(0)" event-node="post_favorite" id="favorite">收藏</a>
                                      <php>}</php>
                                    </span>
                                    {$user_info[$post_detail['post_uid']]['space_link']}<span class="pl5 pr5 f9">/</span><span class="f9">{$post_detail.post_time|friendlyDate}发布</span>                                   
                                  <php>}</php>
                                  </p>
                                </dd>
                            </dl>
                            <div class="pb15 weiba-article"><p class="text">{$post_detail.content}</p></div>
                            
                        </div>
                        <div class="reply">
                          <div style="position:relative;z-index:99" class="pb15 pt15">
                          <php>if($GLOBALS['ts']['mid']){</php>
                                <php>if( $weiba_manage ){</php>
                                <a href="javascript:void(0);" onclick="$('#post_manage').toggle();$('body').bind('click', function(event) {if($(event.target).attr('id') != 'manage') $('#post_manage').css('display', 'none') });" class="right" id="manage">管理</a>
                                <php>}</php>
                                  <span>
                                  <php>if( ($mid==$post_detail['post_uid'] && CheckPermission('weiba_normal','weiba_edit')) || CheckWeibaPermission( $weiba_admin , 0 , 'weiba_edit' ) ){</php>
                                    <a href="{:U('weiba/Index/postEdit',array('post_id'=>$post_detail['post_id']))}">编辑</a>
                                    <i class="vline">|</i>
                                  <php>}</php>
                                  
                                    <php>if( ($mid==$post_detail['post_uid'] && CheckPermission('weiba_normal','weiba_del')) || CheckWeibaPermission( $weiba_admin , 0 , 'weiba_del' ) ){</php>
                                    <a href="#" event-node="post_del" event-args='post_id={$post_detail['post_id']}&weiba_id={$post_detail['weiba_id']}&log=0'>删除</a>
                                    <i class="vline">|</i>
                                    <php>}</php>
                                  
                                  <a event-args="sid={$post_detail['post_id']}&stable=weiba_post&curtable=feed&curid={$post_detail['feed_id']}&initHTML=&appname=weiba&cancomment=1&feedtype=weiba_post" href="javascript:void(0)" event-node="share">转发到微博</a>
                                  <i class="vline">|</i>
                                  <php>if($post_detail['favorite']==1){</php>
                                    <a event-args="post_id={$post_detail['post_id']}&weiba_id={$post_detail['weiba_id']}&post_uid={$post_detail['post_uid']}" href="javascript:void(0)" event-node="post_unfavorite" id="favorite">取消收藏</a>
                                  <php>}else{</php>
                                    <a event-args="post_id={$post_detail['post_id']}&weiba_id={$post_detail['weiba_id']}&post_uid={$post_detail['post_uid']}" href="javascript:void(0)" event-node="post_favorite" id="favorite">收藏</a>
                                  <php>}</php>
                                  </span>
                           <php>}</php>
                                <div class="layer-list" style="position:absolute;right:0;top:35px;display:none;_right:20px;" id="post_manage">
                                   <ul>
                                      <php>if( CheckWeibaPermission('',0,'weiba_global_top') ){</php>
                                        <li>
                                          <php>if($post_detail['top']==2){</php><a style="width:75px" href="#" event-node="post_set" event-args='post_id={$post_detail['post_id']}&type=1&currentValue={$post_detail['top']}&targetValue=0'>取消全局置顶</a><php>}else{</php><a href="#" event-node="post_set" event-args='post_id={$post_detail['post_id']}&type=1&currentValue={$post_detail['top']}&targetValue=2'>设为全局置顶</a><php>}</php>
                                        </li>
                                      <php>}</php>
                                      
                                      <php>if( CheckWeibaPermission ( $weiba_admin , 0 , 'weiba_top') ){</php>
                                        <li>
                                          <php>if($post_detail['top']==1){</php><a href="#" event-node="post_set" event-args='post_id={$post_detail['post_id']}&type=1&currentValue={$post_detail['top']}&targetValue=0'>取消吧内置顶</a><php>}else{</php><a href="#" event-node="post_set" event-args='post_id={$post_detail['post_id']}&type=1&currentValue={$post_detail['top']}&targetValue=1'>设为吧内置顶</a><php>}</php>
                                        </li>
                                       <php>}</php>
                                       
                                        <php>if( CheckWeibaPermission ( $weiba_admin , 0 , 'weiba_marrow') ){</php>
                                        <li>
                                          <php>if($post_detail['digest']==1){</php><a href="#" event-node="post_set" event-args='post_id={$post_detail['post_id']}&type=2&currentValue={$post_detail['digest']}&targetValue=0'>取消精华</a><php>}else{</php><a href="#" event-node="post_set" event-args='post_id={$post_detail['post_id']}&type=2&currentValue={$post_detail['digest']}&targetValue=1'>设为精华</a><php>}</php>
                                        </li>
                                        <php>}</php>
                                        <php>if( CheckWeibaPermission ( $weiba_admin , 0 , 'weiba_recommend') ){</php>
                                        <li>
                                          <php>if($post_detail['recommend']==1){</php><a href="#" event-node="post_set" event-args='post_id={$post_detail['post_id']}&type=3&currentValue={$post_detail['recommend']}&targetValue=0'>取消推荐</a><php>}else{</php><a href="#" event-node="post_set" event-args='post_id={$post_detail['post_id']}&type=3&currentValue={$post_detail['recommend']}&targetValue=1'>设为推荐</a><php>}</php>
                                        </li>
                                      	<php>}</php>
                                      <php>if(CheckWeibaPermission( $weiba_admin , 0 , 'weiba_edit' )){</php>
                                        <li>
                                          <a href="{:U('weiba/Index/postEdit',array('post_id'=>$post_detail['post_id'],'log'=>1))}">编辑</a>
                                        </li>
                                        <php>}</php>
                                        <php>if(CheckWeibaPermission( $weiba_admin , 0 , 'weiba_del' )){</php>
                                        <li>
                                          <a href="#" event-node="post_del" event-args='post_id={$post_detail['post_id']}&weiba_id={$post_detail['weiba_id']}&log=1'>删除</a>
                                        </li>
                                        <php>}</php>
                                   </ul>
                                </div>
                            </div>
                            <div  class="feed_lists">
                            <dl class="feed_list feed_comment">
                              <dd class="content">
                              <php>if($GLOBALS['ts']['mid']){</php>
                                  <div class="repeat clearfix pading">
                                      {:W('WeibaReply',array('tpl'=>'detail', 'weiba_id'=>$post_detail['weiba_id'], 'post_id'=>$post_detail['post_id'], 'post_uid'=>$post_detail['post_uid'], 'feed_id'=>$post_detail['feed_id'], 'limit'=>'20', 'order'=>'DESC', 'addtoend'=>0))}                                   
                                  </div>
                                  <php>}</php>
                              </dd>
                            </dl>
                          </div>
                            
                        </div> 
                     </div>
                 </div>
           	 </div>
          </div>
	   </div>
</div>
<script>
  var setype = function(post_id,type,curvalue){

  };
</script>
<include file="__THEME__/public_footer" />
